-
Notifications
You must be signed in to change notification settings - Fork 379
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add FileBinary[Interface] to support large files without loading them in memory unnecessarily #705
Conversation
I understand the problem, but solution looks a bit hacky. I have to think of a better approach. If nothing comes in my mind I merge this one. @Seldaek Maybe you already have some ideas? |
I don't really see how it is hacky.. sometimes we have files, sometimes we just have data blobs, and converting it all to data blobs is extremely inefficient if a path to a file does the job. The only other way would be to always convert to file and write data blobs in a temp dir, but that's also less efficient and tends to cause new types of issues with permissions and whatnot. The current patch takes care of both of these in the best possible way as far as I can tell. |
@makasim can you elaborate about your concerns? |
First of all I am a big fan of things like this but since we have a BC promise we have to develop a good solution and here's what do not like in current approach:
|
|
Add FileBinary[Interface] to support large files without loading them in memory unnecessarily
Ok then ;) Thanks |
Make sense to me. Thank you |
@Seldaek Last stable release of https://github.com/avalanche123/Imagine was on 19 Sep 2015. As I got it, we need new stable release of imagine to be tagged or install it as |
However, even after plugging optimized version, I am still not able to resize 5Mb image and getting: |
Yeah? Maybe something else broke it then, or maybe that doesn't work with GD. I used imagick. But yes there needs a new tag either way. I'm running on my forks for now as I don't really trust people here since there is no regression test in place I am afraid it'll break in the future. Writing tests would be good but no time. |
@Seldaek I've used GD, maybe it is the culprit. |
This works in combination with php-imagine/Imagine#479 to allow me to generate thumbnails for very large images (>1GB) with low memory usage (tested with 50MB) vs needing to increase the memory usage to a few gigs.
It should be BC as far as I can tell.